package cn.sm1234.dao;

import cn.sm1234.domain.Emp;
import org.springframework.data.jpa.repository.JpaRepository;

import java.io.Serializable;
import java.util.List;

/*
* JpaRepository提供的常用接口
* 1）Repository
* 提供了基于方法名字的查询
* 2)CrudRepository
* 3)PagingAndSortingRepository
* 4)JpaRepsitory
* 5)JPASpecificationExcutor
* */
public interface  EmpRepository  extends JpaRepository<Emp, Serializable> {

    /*基于（Emp模型类）方法名称查询*/
    // 查询name()
    public List<Emp> findByName(String name);
    public List<Emp> findByNameAndGender(String name, String gender);
    public List<Emp> findByTelephoneLike(String telephone);

}


